1. Field of the Invention
The present invention relates to a method and an apparatus for filtering an audio signal.
2. Description of the Related Art
It is frequently necessary to filter audio signals. For example, a certain room character is to be conveyed in the reproduction. Sound recordings frequently take place in the immediate vicinity of the sound source. This means that the portion of the room is not taken into consideration during the recording. If the signal recorded in this manner is not further processed, the listener will not have the same listening impression as a person who was present in the room in which the original event took place.
However, if it is known, for example, from measurements, what influence the room has on the listening event, the recorded audio signal can be converted by subsequent filtering back into the original acoustic signal.
In this connection, it is of no significance in principle as to whether the reproduction takes place through loudspeaker or head set.
In the case of the reproduction through headsets, the known xe2x80x9cin-head localizationxe2x80x9d can be avoided if the binaural effect is taken into consideration during filtering. This is understood to be filtering of the audio signal with the individual head related transfer function of the listener.
The more exact the filters can be taken into consideration during the reproduction, the more true to nature will be the auditory impression.
However, acoustic filters can also be used for achieving a certain tone color or for raising or lowering individual frequency ranges. The so-called dividing networks, which assign an audio signal to the various loudspeakers of a box, also constitute audio filters.
Within the time range, each filtering can be represented by a convolution with the appropriate impulse response. If the audio signals are present in digital form, each convolution constitutes a time-consuming operation which is composed of a large number of multiplications and additions. Accordingly, there have been many attempts to reduce the required computations for this convolution.
The simplest method is to carry out a so-called windowing. In that case, only a portion of the impulse response is utilized for the convolution, not the entire impulse response. Consequently, important information may be lost. In practice, windowing is carried out in such a way that only the beginning of the impulse response is taken into consideration, and the end, in which the important components for the fine structure (e.g. reverberation) at low and middle frequencies are contained, is cut off. This is particularly true for minimum phase filters or approximate minimum phase filters.
An algorithm which limits the impulse response to those components which are relevant for listening has been proposed in German Patent 43 28 620. While this does not constitute an exact solution of the problem, the utilization of the various masking effects makes it possible that the listener does not perceive a difference between the reproduced audio signal and the original audio signal. Only those components of the impulse response are utilized which are above a certain threshold. This means that the required computations can be reduced significantly.
As explained in the aforementioned German patent, 5xc3x97109 additions and multiplications per second are required for an exact computation of the convolution in the case of an impulse response of two seconds, a sampling rate of 50 kHz and a bandwidth of the audio signal of 20 kHz.
Under these circumstances, it is understandable that methods have been sought for reducing the required computations for the convolution.
Another known measure for reducing the required computations in digital filtering has been described in the paper xe2x80x9cAufwand bei Digitalfiltern gesenktxe2x80x9d [Reduction of requirements in digital filters], published in xe2x80x9cElektronikxe2x80x9d, Volume 15, 1988, pages 82ff. In this method, the-audio signal is additionally filtered in order to cut the bandwidth of the audio signal in half. Subsequently, the audio signal is sampled with half the sampling frequency. As a result of this measure, all high frequency components disappear, i.e., the useful signal obtained after the convolution has a significantly smaller a bandwidth than the original audio signal. In other words, the reduction of the required computations is achieved in exchange for an impairment of the sound impression.
Therefore, it is the primary object of the present invention to provide a method and an apparatus of the above-described type which facilitate a significant reduction of the number of computing operations without negatively influencing the high-frequency signal portions of the audio signal and of the impulse response.
In accordance with the present invention, the method for filtering an audio signal includes the steps of making the audio signal available in digitalized form, wherein the duration of the sampling interval is half or less than half of the period duration of the highest frequency to be expected in the audio signal, a digitalized impulse response is made available in accordance with the desired filtering effect, and a convolution sum is formed from the samples of the impulse response and the samples of the audio signal, wherein,
(i) several adjacent samples of the impulse response define pa corresponding interval within at least one time portion of the impulse response which is shorter than the impulse response,
(ii) within the interval defined in this manner, the samples of the impulse response corresponding to the interval defined in this manner are equated to one value which is one function of one or more of the samples of the digitalized impulse response falling within the interval defined in this manner, and
(iii) the steps (i) and (ii) are repeated as necessary, with the requirement that the intervals defined in this manner do not overlap,
so that for computing the convolution sum an impulse response is utilized which is time-coarsned at least in one time portion, and
the impulse response is otherwise used unchanged for the convolution.
The apparatus for carrying out this method includes a computing unit with an input to which the samples of the digitalized audio signal are supplied and a storage unit in which are stored the values which correspond to samples of a predetermined impulse response.
When computing the output signal of the filter, a real or virtual impulse response is used which, compared to the actual or true impulse response, is approximated by steps with the greater time duration. Within each step, all samples of the impulse response contained in the step are kept constant, independently of the actual pattern of the true impulse response. Consequently, the required computations can be significantly reduced. With respect to the computation of one sample of the output signal of the filter, this means that it is sufficient that, within an interval of the audio signal which is covered by a step of the impulse response defined as described above, only the sampling values of the audio signal must be summed up and subsequently the sum formed in this manner must only be multiplied with the sample of the step of the impulse response. It is apparent that one multiplication and one addition are sufficient for a step of the approximated impulse response. In the prior art, on the other hand, for the corresponding time portion of the impulse response, it is necessary to carry out as many additions and multiplications as sampling values are contained therein.
On the other hand, in the novel method according to the present invention, the acoustically significant influences of the middle and low frequencies and/or of the decaying portion of the impulse response of the respectively selected filter are maintained.
A further simplification is achieved in that, for the next sample of the output signal, instead of a complete new sum formation, only the omitted samples is subtracted from the previously obtained sum over the samples of the audio signal and that a newly added samples is summed up instead.
The steps of the impulse response utilized for the computation, called approximated impulse response in the following, must have a duration which is at least half of the period duration of the highest frequency to be considered. Assuming that middle frequencies of the auditory range are still to be taken into consideration, for example, in order to avoid xe2x80x9cin-head localizationxe2x80x9d and other acoustic effects, it is sufficient to utilize an approximated impulse response whose steps have a duration of greater than or equal to {fraction (1/3000)} sec. On the other hand, the audio signal has a frequency range which reaches 15 kHz so that the time portions of the approximated impulse response are 10 times wider than the time portions of the audio signal. When taking this relationship and the above explanations into consideration, the number of necessary multiplications and additions per second are reduced by the factor 5 as compared to the state of the art.
If the duration of the steps of the approximated impulse response can be selected even longer, even greater reductions of the numbers of necessary multiplications and additions are achieved.
The various features of novelty which characterize the invention are pointed out with particularity in the claims annexed to and forming a part of the disclosure. For a better understanding of the invention, its operating advantages, specific objects attained by its use, reference should be had to the drawing and descriptive matter in which there are illustrated and described preferred embodiments of the invention.